/**  
 * All rights Reserved, Designed By www.richfit.com
 * @Title:  BalanceAnnualBorrowDetailController.java   
 * @Package com.richfit.cuba.modular.controller   
 * @Description:    TODO
 * @author: Alan
 * @date:   2019-03-30 19:25:15
 * @version V1.0 
 * @Copyright: 2019 www.richfit.com Inc. All rights reserved. 
 */
package com.richfit.cuba.modular.controller;

import java.math.BigDecimal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.richfit.cuba.modular.AbsScanService;
import com.richfit.cuba.modular.entity.BalanceAnnualBorrowDetail;
import com.richfit.cuba.modular.lsms.entity.SafeReportData;
import com.richfit.cuba.modular.service.IBalanceAnnualBorrowDetailService;

/**   
 * @ClassName:  BalanceAnnualBorrowDetailController   
 * @Description:TODO
 * @author: Alan
 * @date:   2019-03-30 19:25:15
 *     
 * @Copyright: 2019 www.richfit.com Inc. All rights reserved. 
 */
@Service
public class BalanceAnnualBorrowDetailHandleService extends AbsScanService<BalanceAnnualBorrowDetail> {

	@Autowired
	public BalanceAnnualBorrowDetailHandleService(IBalanceAnnualBorrowDetailService service) {
		super(service);
	}

	@Override
	public SafeReportData setBussinuessData(BalanceAnnualBorrowDetail obj, SafeReportData detailObj) {
		detailObj.setOilId(obj.getOil());
		if(obj.getQuantity() != null) {
			detailObj.setAbnomalValue(BigDecimal.valueOf(obj.getQuantity()));
		}
		if(obj.getPlanMonth() != null) {
			detailObj.setCreateDate(obj.getPlanMonth());
		}
		return detailObj;
	}

}
